﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Cofe.Core;
using Cofe.Core.Property;

namespace Cofe.IO
{
    public static class IPropertyHostIOExtension
    {
        public static string GetArchiveType(this IPropertyHost propertyHost)
        {
            return PathFE.GetExtension(propertyHost.Behaviors.GetProperty<string>(CofeProperties.FullParseName)).ToLower();
        }

        public static string GetArchiveType(this IPropertyProvider primaryPropertyProvider)
        {
            return PathFE.GetExtension(primaryPropertyProvider.GetOneProperty(CofeProperties.FullParseName).ValueAsString).ToLower();
        }
    }
}
